package com.hurl.waguji.biz.schedule;

import java.io.Serializable;
import java.util.Date;

import com.hurl.waguji.base.dataprocess.ProcessIdentifier;
import com.hurl.waguji.base.dataprocess.ProcessParams;

public class ProcessJobDetail implements Serializable{
	private ProcessIdentifier identifier;
	private ProcessParams params = ProcessParams.getDefault();
	private String cronExpression;
	private String status;
	private Date nextFireTime;
	private Date previousFireTime;
	
	public ProcessJobDetail(ProcessIdentifier identifier){
		this.identifier = identifier;
	}
	
	public ProcessIdentifier getIdentifier() {
		return identifier;
	}
	public void setIdentifier(ProcessIdentifier identifier) {
		this.identifier = identifier;
	}
	public ProcessParams getParams() {
		return params;
	}
	public void setParams(ProcessParams params) {
		this.params = params;
	}
	public String getCronExpression() {
		return cronExpression;
	}
	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Date getNextFireTime() {
		return nextFireTime;
	}
	public void setNextFireTime(Date nextFireTime) {
		this.nextFireTime = nextFireTime;
	}
	public Date getPreviousFireTime() {
		return previousFireTime;
	}
	public void setPreviousFireTime(Date previousFireTime) {
		this.previousFireTime = previousFireTime;
	}

	@Override
	public ProcessJobDetail clone() throws CloneNotSupportedException {
		ProcessJobDetail clone = new ProcessJobDetail(this.getIdentifier());
		clone.setCronExpression(this.getCronExpression());
		clone.setNextFireTime(this.getNextFireTime());
		clone.setParams(this.getParams());
		clone.setPreviousFireTime(this.getPreviousFireTime());
		clone.setStatus(this.getStatus());
		return clone;
	}
	
}
